package cn.lingyangwl.agile.food.core.model.rqrs.cart;

import cn.lingyangwl.agile.model.constants.ValidationCons;
import cn.lingyangwl.agile.food.model.constants.ShopCons;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 购物车
 *
 * @author shenguangyang
 */
@Getter
@Setter
@ApiModel(value = "更新购物车")
public class CartUpdateReq {
    private Long id;

    @ApiModelProperty(value = "商品数量")
    @NotNull(message = ValidationCons.NOT_EMPTY)
    private Integer number;

    @ApiModelProperty(value = "商品id")
    @NotNull(message = ValidationCons.NOT_EMPTY)
    private Long goodsId;

    /**
     * @see ShopCons.GoodsType
     */
    @ApiModelProperty(value = "购物车类型")
    @NotEmpty(message = ValidationCons.NOT_EMPTY)
    private String cartType;
}
